Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Java Multithreading Interview Questions and Answers

Question: How do you create a thread in Java?
Answer: You can create a thread by extending the Thread class or implementing the Runnable interface.

Example:

Example using Thread class: 
class MyThread extends Thread { 
public void run() { 
/* Thread logic */ 

}
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook